@extends('layout/wap')
@section('headcss')
@stop
@section('content')
    <style>
        body{
            background:#fff;
        }
    </style>
    <?php
    function subtext($text, $length)
    {
        if(mb_strlen($text, 'utf8') > $length) {
            return mb_substr($text, 0, $length, 'utf8').'...';
        } else {
            return $text;
        }
    }?>
    <div class="banner">
        <div class="swiper-container">
            <div class="swiper-wrapper">
                @if(!empty($loading_ad) && isset($loading_ad))
                    @foreach($loading_ad as $l)
                        <div class="swiper-slide"> <img src="{{URL::asset('img/'.$l['pictures'])}}" width="100%" alt=""/></div>
                    @endforeach
                @endif
            </div>
        </div>

    </div>
    <ul class="m-nav container">
        <li><a href="/xrdt/t0"><img src="{{URL::asset('img/wap/f1.jpg')}}" alt=""/>
                <h2>寻人大厅</h2></a></li>
        <li><a href="/news/n0"><img src="{{URL::asset('img/wap/f2.jpg')}}" alt=""/>
                <h2>综合资讯</h2></a></li>
        <li><a href="/request.html"><img src="{{URL::asset('img/wap/f3.jpg')}}" alt=""/>
                <h2>真情留言</h2></a></li>
        <li><a href="/addservice.html"><img src="{{URL::asset('img/wap/f4.jpg')}}" alt=""/>
                <h2>增至服务</h2></a></li>
    </ul>
    <div id="page1">
        <div class="container">
            <h1 class="title">紧急寻人</h1>
            <ul>
                @if(!empty($getrecommend))
                    @foreach($getrecommend as $p)
                        <a href="/xrdt/{{$p->id}}.html">
                            <li><img src="{{URL::asset('img/'.$p->miss_pic)}}" alt=""/>
                                <div class="text">
                                    <h2 class="ov">{{subtext($p->miss_desc,12)}}</h2>
                                    <p class="ov">被寻人姓名：{{$p->miss_name}}</p>
                                    <p class="ov">出生日期：{{$p->miss_barth}}</p>
                                    <p class="ov">失散日期：{{$p->miss_date}}</p>
                                    <p class="ov">失散地点：{{$p->miss_access}}</p>
                                </div>
                            </li></a>
                    @endforeach
                @endif
            </ul>
            <div class="btn-group"><a href="tel:+400-991-6578">提供线索</a><a href="/fbxr.html">我要寻人</a></div>
        </div>
    </div>
    <div class="line"></div>
    <div class="page2">
        <div class="container">
            <h1 class="title">最新寻人<a href="/xrdt/t0">更多</a></h1>
            <ul>
                @if(!empty($new_msg))
                    @foreach($new_msg as $m)
                        <li><a href="/xrdt/{{$m->id}}.html"><img src="{{URL::asset('img/'.$m->miss_pic)}}" alt="" style="height: 120px;width: 90px"/>
                                <p class="ov wordcenter">{{$m->miss_name}}  {{$m->Name}}</p></a></li>
                    @endforeach
                @endif
            </ul>
        </div>
    </div>
    <div class="page2">
        <div class="container">
            <h1 class="title">寻人大厅<a href="/xrdt/t0">更多</a></h1>
        </div>
        <dl class="tab">
            <dd class="active" onclick="allfind(this)"  >全部</dd>
            <dd onclick="changetab(this)" value="3" >家寻亲人</dd>
            <dd onclick="changetab(this)" value="4">亲人寻家</dd>
            <dd onclick="changetab(this)" value="2">寻战友</dd>
            <dd onclick="changetab(this)" value="1">寻找老友</dd>
            <dd onclick="changetab(this)" value="5">台海寻人</dd>
            <dd onclick="changetab(this)" value="6">海外寻人</dd>
        </dl>
        <div class="container">
            <ul class="change_tab">
                @if(!empty($default))
                    @foreach($default as $d)
                        <li class="fl">
                            <a href="/xrdt/{{$d->id}}.html"><img style="width:90px;height: 150px" class="specical_img" src="{{URL::asset('img/'.$d->miss_pic)}}" alt=""/>
                                <h1 class="wordcenter">{{$d->miss_name}}   {{$d->Name}} </h1>
                            </a>
                        </li>
                    @endforeach
                @endif
            </ul>
        </div>
    </div>
    <div class="page3">
        <div class="container">
            <h1 class="title">综合资讯<a href="/news/n0">更多</a></h1>
        </div>
        <dl class="tab2">
            <dd class="active" onclick="suggest_news(this)" value="2">寻人方法</dd>
            <dd onclick="suggest_news(this)" value="3">政策法规</dd>
            <dd onclick="suggest_news(this)" value="1">防拐防骗</dd>
        </dl>
        <div class="tab-container">
            <ul class="replace_box">
                @if(!empty($recommend_news_two))
                    @foreach($recommend_news_two as $two)
                        <li> <a class="ov" href="/news/{{$two->id}}.html">· {{$two->titles}}</a></li>
                    @endforeach
                @endif
            </ul>

        </div>
    </div>
    <div class="line"></div>
    <div class="page4">
        <div class="container">
            <h1 class="title">各地分站</h1>
            <ul>
                @if(!empty($areaarray))
                    @foreach($areaarray as $a)
                        @if($a->Name != '中国')
                            <li><a onclick="changecity(this)" value="{{$a->Id}}">{{$a->Name}}</a></li>
                        @endif
                    @endforeach
                @endif
            </ul>
        </div>
    </div>
@stop
@section('js')
    <script>
        var swiper = new Swiper('.swiper-container', {
            spaceBetween: 30,
            centeredSlides: true,
            autoplay: {
                delay: 2500,
                disableOnInteraction: false,
            },
            pagination: {
                el: '.swiper-pagination',
                clickable: true,
            },
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },
        });
    </script>
    <script type="text/javascript" src="{{URL::asset('js/jquery.cookie.js')}}"></script>
    <script src="{{URL::asset('js/wap/webindex.js')}}"></script>
@stop